
<div class="am-u-sm-12 widget main-w" >
	<ol class="am-breadcrumb">
		<li><a href="{:url('/admin/index')}">首页</a></li>
		<li><a href="{:url('/admin/car/index')}">业务管理</a></li>
		<li class="am-active">北斗接入</li>
	</ol>
	<div class="am-u-sm-12">
		<form class="am-form-inline tpl-form-border-form" action="" method="get">
			<div class="am-u-sm-12">
				<div class="am-u-sm-3">
					<label class="am-u-sm-4 am-form-label am-text-truncate" >车牌号：</label>
					<div class="am-form-group am-u-sm-8 cl-p">
						<input type="text" class="tpl-form-input" name="number" placeholder="请输入车牌号" value="{$Think.get.number}">
					</div>
				</div>
				<div class="am-u-sm-9">
					<div class="am-u-sm-2">
					<button type="submit" class="am-btn am-btn-sm am-btn-primary am-radius" style="margin-top: -2px;">查询<i class="am-icon-search"></i></button>
					</div>
					<div class="am-u-sm-10">
						<label class="am-u-sm-2 am-form-label am-text-truncate" >显示车辆数：</label>
						<div class="am-form-group am-u-sm-4 cl-p">
						<select class="car_num" >
							<option value="0">全部</option>
							<option value="100">100</option>
							<option value="50">50</option>
							<option value="20">20</option>
						</select>
						</div>
						<div></div>
					</div class="am-u-sm-6">
				</div>
			</div>
		</form>
	</div>
	<div class="am-u-sm-12" style="position: relative;">
		<div id="map" data-map="1" style="width: 100%;height: 700px;margin-top:20px ;" ></div>
		<div id="panel"></div>
		<div class="am-u-sm-12  po_absolute anomaly" style="top: 0px;left: 0px;margin-top:20px ;box-sizing: border-box;">
			<div class="am-u-sm-12 cl-p">
				<div class="str3 str_wrap">
					<ul style="font-size: 15px;line-height: 30px;height: 30px;">
						</ul>
				</div>
			</div>
			
		</div>
		
		<div class="am-u-sm-2 carlist" style="position: absolute;top:100px;left: 50px;height: 500px;background: rgba(255,255,255,0.5);border:1px solid #ccc;border-radius: 5px;">
			<div class="nowdata " style="padding: 10px;">车辆列表 </div>
			<div style="height: 88%;overflow: hidden;" class="carlist-list">
				<ul></ul>
			</div>
		</div>
		<div class="am-u-sm-3 orderlist" style="position: absolute;top: 100px;left: 50px;height: 500px;background: rgba(255,255,255,0.5);border:1px solid #ccc;border-radius: 5px;display: none;">
			<div style="padding: 10px;"><span class="ordertitle">订单</span>   <span class="am-fr"><button type="button" class="am-btn am-btn-xs am-btn-secondary am-round backcar">选择车辆</button></span></div>
			<div style="height: 85%;overflow: hidden;border-bottom: 1px solid #ccc;"  class="orderlist-list">
				<ul >
				</ul>
			</div>
			<div class="am-fr am-u-sm-5" >
				<span class="previous" style="font-size: 12px;cursor: pointer;">上一页</span>
				<span class="page" style="font-size: 12px;">1</span>
				<span class="next" style="font-size: 12px;cursor: pointer;">下一页</span>
			</div>
		</div>
		
	</div>
</div>
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.2&key={:config('base.mapkey')}&plugin=AMap.Driving"></script>
<script src="//webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>

<script src="{$static_dir}/assets/js/jquery.liMarquee.js"></script>
<script>
		$.ajax({
		type:"get",
		url:"{$static_dir}/assets/json/anomaly.json",
		success:function(res){
			if(typeof res=='string'){
				var res = JSON.parse(res).data;
			}else{
				var res = res.data;
			}
			var strbody="";
			var wid=0;
			for(var i=0 ;i<res.length;i++){
				if(res[i].status==1){
				if(res[i].anomaly_type==1){
					strbody+=`<li style="float: left;padding-left:50px ;color:red">司机目的地偏离预警（订单${res[i].order_no}，司机${res[i].driver_name}出现目的地偏离）</li>`
				}else if(res[i].anomaly_type==2){
					strbody+=`<li style="float: left;padding-left:50px;color:red">司机出发地偏离预警（订单${res[i].order_no}，司机${res[i].driver_name}出发目的地偏离）</li>`
				}else if(res[i].anomaly_type==3){
					strbody+=`<li style="float: left;padding-left:50px;color:red">订单轨迹偏离预警（订单${res[i].order_no}，车辆行驶过程中出现轨迹偏离）</li>`
				}else if(res[i].anomaly_type==4){
					strbody+=`<li style="float: left;padding-left:50px;color:red">订单超时预警（订单${res[i].order_no}，行驶时间过长）</li>`
				}else if(res[i].anomaly_type==5){
					strbody+=`<li style="float: left;padding-left:50px;color:red">空车移动预警（车辆${res[i].order_no}出现空车移动）</li>`
				}
				}else{}
			}
			
			
			$('.str3 ul').html(`${strbody}`)
			for(var j=0;j<$('.str3 ul li').length;j++){
				var num=$('.str3 ul li').eq(j).width()-0
				wid+=num
			}
			wid += parent.$('.str3 ul li').length * 80;
			$('.str3 ul').css('width',wid)
		}
	});
</script>